package sctu.edu.java.year2016.team07.nieying.practice.Review;

/**
 * Created by Administrator on 2016/6/19 0019.
 */
public class ZiFu {
    public static void main(String[] args){
        String str1="  I am NingYing   ";
        String str2="  I am NingYing   ";
        System.out.println(""+str1.length());
        System.out.println(""+str1.indexOf("i"));
        System.out.println(""+str1.lastIndexOf("i"));
        System.out.println(""+str1.charAt(4));
        System.out.println(""+str1.trim());
        System.out.println(""+str1.replaceAll(" ", ""));
        System.out.println(str1.replace("am","are"));
        System.out.println(""+str1.replaceFirst("in","in"));
        System.out.println(str1.equals(str2));
        System.out.println(str1.equalsIgnoreCase(str2));
        System.out.println(str1.startsWith("I"));
        System.out.println(str2.endsWith("NingYing"));

    }
}
